<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div style="height: 15px;"></div>
        <div class="row">
            <div class="col-sm-3 m-b-xs">
                <div :class="planDate | _getDiwShow">
                    <input v-model="planDate" type="text" class="form-control" readonly placeholder="计划生产交期日期" id="plan">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="input-group">
                    <input v-model="startDate" type="text" class="form-control" readonly placeholder="开令开始时间" id="start">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
            <div class="col-sm-3 m-b-xs">
                <div class="input-group">
                    <input v-model="endDate" type="text" class="form-control" readonly placeholder="开令结束时间" id="end">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="input-group">
                    <input type="text" placeholder="请输入制令编码或商品编码搜索" v-model="keyword" @keyup.enter="onSearch" class="input form-control">
                    <span class="input-group-btn">
                        <button type="button" class="btn pink-bg color-white" @click="onSearch"> 搜索</button>
                    </span>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-3 padding_7px_10px">
                <div style="padding: 10px 0;">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <a href="javascript:void(0);" @click="onRefresh" class="btn btn-white btn-bitbucket" ><i class="fa fa-refresh"></i>&nbsp;刷新</a>
                            </td>
                            <td>
                                <form id="exportExcelForm" method="post" action="/System/Auth02/exportExcel.html" enctype="multipart/form-data" class="input-group display-none"></form>
                                <a href="javascript:void(0);"  @click="onExportExcel" class="navbar-minimalize btn green-bg color-white"><i class="fa fa-download"></i>&nbsp;<span>导出数据</span></a>
                            </td>
                            <td>
                                <div class="display-none">
                                    <form id="importExcelForm" method="post" action="/System/Auth02/importExcel.html" enctype="multipart/form-data" class="input-group display-none">
                                        <input id="uploadExcel" name="uploadFile" class="weui-uploader__input" type="file" accept="application/vnd.ms-excel" multiple="" @change="onUploadExcel">
                                    </form>
                                </div>
                                <a href="javascript:void(0);"  @click="onOpenUploadExcel" class="navbar-minimalize btn blue-bg color-white"><i class="fa fa-cloud-upload"></i>&nbsp;<span>导入批量修改排序</span></a>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="col-sm-3">
                <div style="background-color: skyblue; padding: 15px;">
                    完工:&nbsp;&nbsp;
                    <label @click="onRadioChecked('wg', '0')">
                        <input type="radio" :checked="wg == '0'" name="radioWG">&nbsp;无
                    </label>
                    &nbsp;&nbsp;
                    <label @click="onRadioChecked('wg', '1')">
                        <input type="radio" :checked="wg == '1'" name="radioWG">&nbsp;已完工
                    </label>
                    <label @click="onRadioChecked('wg', '2')">
                        <input type="radio" :checked="wg == '2'" name="radioWG">&nbsp;未完工
                    </label>
                </div>
            </div>
            <div class="col-sm-3 m-b-xs">
                <div style="background-color: papayawhip; padding: 15px;">
                    车缝:&nbsp;&nbsp;
                    <label @click="onRadioChecked('ct', '0')">
                        <input type="radio" :checked="ct == '0'" name="radioCF">&nbsp;无
                    </label>
                    &nbsp;&nbsp;
                    <label @click="onRadioChecked('ct', '1')">
                        <input type="radio" :checked="ct == '1'"  name="radioCF">&nbsp;部分车缝
                    </label>
                    &nbsp;&nbsp;
                    <label @click="onRadioChecked('ct', '2')">
                        <input type="radio" :checked="ct == '2'"  name="radioCF">&nbsp;全部车缝
                    </label>
                    &nbsp;&nbsp;
                    <label @click="onRadioChecked('ct', '3')">
                        <input type="radio" :checked="ct == '3'"  name="radioCF">&nbsp;未车缝
                    </label>
                </div>
            </div>
            <div class="col-sm-3">
                <div style="background-color: pink; padding: 15px;">
                    床网:&nbsp;&nbsp;
                    <label @click="onRadioChecked('cw', '0')">
                        <input type="radio" :checked="cw == '0'" name="radioCW">&nbsp;无
                    </label>
                    &nbsp;&nbsp;
                    <label @click="onRadioChecked('cw', '1')">
                        <input type="radio" :checked="cw == '1'" name="radioCW">&nbsp;部分完工
                    </label>
                    &nbsp;&nbsp;
                    <label @click="onRadioChecked('cw', '2')">
                        <input type="radio" :checked="cw == '2'" name="radioCW">&nbsp;全部完工
                    </label>
                    &nbsp;&nbsp;
                    <label @click="onRadioChecked('cw', '3')">
                        <input type="radio" :checked="cw == '3'" name="radioCW">&nbsp;未完工
                    </label>
                </div>
            </div>
        </div>
        <div style="height: 15px;"></div>
        <div class="table-responsive">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <!--<th>计划生产交期</th>
                    <th>开令时间</th>
                    <th>制令编号</th>-->
                    <th>床网所<br />需数量</th>
                    <th>商品品号</th>
                    <th>床套名称</th>
                    <th>床网名称</th>
                    <th>排序<br />权重</th>
                    <th>完工<br />入库</th>
                    <th>总量</th>
                    <th>车缝<br />完工</th>
                    <th>计划使<br />用床网</th>
                    <th>实际使<br />用床网</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr v-for="(info, index) in moList"  :class="index | _getRowsColor">
                    <!--<td>{{info.fPlanEndDate | _formatDate}}</td>
                    <td>{{info.fOpenDate | _formatDateTime}}</td>
                    <td>{{info.fMONo}}</td>-->
                    <td class="text_align_center" :class="index | _getBgColor"><input type="number" @change="onSubEideMoInfo(index)" class="text_align_center" min="0" :max="info.fMoQty - info.fStep02" v-model="info.fPlanCountCw" style="width: 60px;color: #252525;" /></td>
                    <td>{{info.fGoodsCode}}</td>
                    <td>{{info.fModelNameCT}}</td>
                    <td>{{info.fModelNameCW}}</td>
                    <td class="text_align_center"><input type="number" @change="onSubEideMoInfo(index)" class="text_align_center" min="0" max="9999" v-model="info.sort" style="width: 60px;" /></td>
                    <td>{{info.fProStkInQty | _formatNumber}}</td>
                    <td>{{info.fMoQty | _formatNumber}}</td>
                    <td><span v-if="info.fIsNotCount == '0'">未知</span><span v-if="info.fIsNotCount == '1'">{{info.fStep01}}</span></td>
                    <td :class="index | _getBgColor">
                        <span v-if="info.fIsNotCount == '0'">未知</span>
                        <span v-if="info.fIsNotCount == '1' && info.fModelCodeCW != null" :id="'plan_'+index">{{info.fQtyCW}}</span>
                        <a href="javascript:void(0);" @click="onConfirmWriteOff(index)" v-if="info.fIsNotCount == '1' && info.fModelCodeCW != null" class="btn pink-bg color-white display-none" :id="'btn_'+index">核销({{info.fQtyCW}})</a>
                        <span v-if="info.fIsNotCount == '1' && info.fModelCodeCW == null">N/A</span>
                    </td>
                    <td>
                        <span v-if="info.fIsNotCount == '0'">未知</span>
                        <span v-if="info.fIsNotCount == '1' && info.fModelCodeCW != null && parseInt(info.fStep02) == 0">{{info.fStep02}}</span>
                        <a href="javascript:void(0);" @click="onUnWriteOff(index)" v-if="info.fIsNotCount == '1' && info.fModelCodeCW != null && parseInt(info.fStep02) > 0" class="btn orange-bg color-white" :id="'unbtn_'+index" style="display: inline">反核销({{info.fStep02}})</a>
                        <span v-if="info.fIsNotCount == '1' && info.fModelCodeCW == null">N/A</span>
                    </td>
                    <td>
                        <a href="javascript:void(0);" @click="onConfirmExportExcel(index)" class="btn green-bg color-white" >打印</a>
                    </td>
                    <!--<td><span v-if="info.fIsNotCount == '0'">未知</span><span v-if="info.fIsNotCount == '1' && info.fModelCodeCW == null">N/A</span></td>-->
                    <!--<td class="text_align_center"><input type="number" @change="onSubEideMoInfo(index)" class="text_align_center" min="0" max="9999" v-model="info.fStep01" style="width: 80px;" /></td>
                    <td class="text_align_center"><input type="number" @change="onSubEideMoInfo(index)" class="text_align_center" min="0" max="9999" v-model="info.fStep02" style="width: 80px;" /></td>-->
                </tr>
                </tbody>
                <!--<tfoot v-if="totle > size">
                <tr>
                    <td colspan="15">
                        <div class="col-sm-3 m-b-xs" style="padding: 15px 0;">
                            第 <input v-model="toPage" style="text-align:center; width: 50px;" /> 页
                            <a href="javascript:void(0);" class="btn btn-primary btn-sm"  @click="onToPage">跳转</a>
                            <span v-if="pages">共{{pages.length}}页</span>
                        </div>
                        <div class="col-sm-9 m-b-xs">
                            <ul class="pagination pull-right">
                                <li v-if="pages" class="footable-page"  :class="1 | _currPageLeft"><a href="javascript:void(0);" @click="onSetPage(page -1)" class="padding_7px_10px" ><i class="fa fa-chevron-left"></i></a></li>
                                <li v-for="info in pages" class="footable-page" :class="info | _currPage"><a href="javascript:void(0);" @click="onSetPage(info)">{{info}}</a></li>
                                <li v-if="pages" class="footable-page"  :class="2 | _currPageRight"><a href="javascript:void(0);" @click="onSetPage(page +1)" class="padding_7px_10px" ><i class="fa fa-chevron-right"></i></a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                </tfoot>-->
            </table>
            <div v-if="totle > 0">
                <a v-if="moList.length == totle" class="btn btn-default btn-rounded btn-block" href="javascript:void(0);">{{moList.length}} / {{totle}} 已到底了</a>
                <a v-if="moList.length < totle" class="btn btn-default btn-rounded btn-block pink-bg" href="javascript:void(0);" @click="onMoreMoList">{{moList.length}} / {{totle}} 点击加载更多</a>
            </div>
        </div>

    </div>
</div>